var express = require('express');
var router = express.Router();
var mongoose = require('mongoose');

// 连接数据库
mongoose.connect('mongodb://127.0.0.1:27017/everyq');
mongoose.connection.on("connected", function () {
  console.log("连接成功")
});
mongoose.connection.on('error', function () {
  console.log("连接失败")
});
mongoose.connection.on('disconnected', function () {
  console.log("disconnected")
});


module.exports = router;
